<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>沃尔沃</title>
<link href="media/css/jquery.dataTables.css" rel="stylesheet">
<script type="text/javascript" src="media/js/jquery.js"></script>
<script type="text/javascript" src="media/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="my/js/commons.js"></script>
<script type="text/javascript">
$.fn.dataTableExt.oApi.fnSearchForm = function ( oSettings,data){
	oSettings.aoSearchData=data;
	this.fnPageChange(0);
    //oSettings.oInstance._fnServerParams(oSettings,aoData);
}
function formSearch1(formSearch1){
	console.log(tb);
	tb.fnClearTable();
	tb.fnDestroy();
}
var tb=null;
	$(function(){
		tb=$("#tb_01").dataTable({
			"bFilter":false,
			"bSort":false,
			"bProcessing": true,
	        "bServerSide": true,
		    "sAjaxSource": "../h1.json",
		    "fnServerParams":function(aoData){
		    	console.log("fnServerParams");
		    	//fnSearchForm();
		    },
		    "sServerMethod":"POST",
		    "aoColumns": [
            { "mData": "engine" },
            { "mData": "browser" },
            { "mData": "platform" },
            { "mData": "version" },
            { "mData": "grade" }
        ]
		})
	})
	function test(){
		tb.fnSearchForm([{"name":"name","value":"sdfdsfssd"},{"name":"password","value":"123456"}]);
	}
	var data={"name":1234123};
	function test1(){
		formSearch1(tb,data);
	}
	function test2(){
		tb.fnSearchForm(null);
	}
</script>
</head>
<body>
	<button onclick="test();">
	搜索
	</button>
	<button onclick="test1();">
	Test1
	</button>
	<button onclick="test2();">
	重置
	</button>
	<table id="tb_01">
		<thead>
			<tr>姓名</tr>
			<tr>姓名</tr>
			<tr>姓名</tr>
			<tr>姓名</tr>
			<tr>姓名</tr>
		</thead>
	</table>
</body>
</html>